/**
 * Copyright &copy; 2012-2014 <a href="https://github.cn.apestar">JeeSite</a> All rights reserved.
 */
package cn.apestar.modules.common.version.entity;

import cn.apestar.common.persistence.DataEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.hibernate.validator.constraints.Length;

import java.util.Date;

/**
 * APP版本参数配置Entity
 *
 * @author yudw
 * @version 2017-03-08
 */
public class AppVersion extends DataEntity<AppVersion> {

    private static final long serialVersionUID = 1L;

    private String versionCode;        // version_code

    private String versionName;        // version_name

    private String description;        // description

    private String isForceUpdate;        // is_force_update

    private String publishStatus;        // publish_status

    private String commonNeedUpdate;        // common_need_update

    private String versionUrl;        // version_url

    private String versionSize;        // version_size

    private String isDeleted;        // is_deleted

    private Date createTime;        // create_time

    private Date updateTime;        // update_time

    public AppVersion() {
        super();
    }

    public AppVersion(String id) {
        super(id);
    }

    @Length(min = 1, max = 11, message = "version_code长度必须介于 1 和 11 之间")
    public String getVersionCode() {
        return versionCode;
    }

    public void setVersionCode(String versionCode) {
        this.versionCode = versionCode;
    }

    @Length(min = 1, max = 50, message = "version_name长度必须介于 1 和 50 之间")
    public String getVersionName() {
        return versionName;
    }

    public void setVersionName(String versionName) {
        this.versionName = versionName;
    }

    @Length(min = 0, max = 500, message = "description长度必须介于 0 和 500 之间")
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Length(min = 0, max = 1, message = "is_force_update长度必须介于 0 和 1 之间")
    public String getIsForceUpdate() {
        return isForceUpdate;
    }

    public void setIsForceUpdate(String isForceUpdate) {
        this.isForceUpdate = isForceUpdate;
    }

    @Length(min = 0, max = 1, message = "publish_status长度必须介于 0 和 1 之间")
    public String getPublishStatus() {
        return publishStatus;
    }

    public void setPublishStatus(String publishStatus) {
        this.publishStatus = publishStatus;
    }

    @Length(min = 0, max = 1, message = "common_need_update长度必须介于 0 和 1 之间")
    public String getCommonNeedUpdate() {
        return commonNeedUpdate;
    }

    public void setCommonNeedUpdate(String commonNeedUpdate) {
        this.commonNeedUpdate = commonNeedUpdate;
    }

    @Length(min = 0, max = 255, message = "version_url长度必须介于 0 和 255 之间")
    public String getVersionUrl() {
        return versionUrl;
    }

    public void setVersionUrl(String versionUrl) {
        this.versionUrl = versionUrl;
    }

    @Length(min = 0, max = 64, message = "version_size长度必须介于 0 和 64 之间")
    public String getVersionSize() {
        return versionSize;
    }

    public void setVersionSize(String versionSize) {
        this.versionSize = versionSize;
    }

    @Length(min = 0, max = 4, message = "is_deleted长度必须介于 0 和 4 之间")
    public String getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(String isDeleted) {
        this.isDeleted = isDeleted;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

}